Having covered Maine process modules in the previous section, this new section will focus on modules
specific to the Renderer process.
This means that instead of working in Maine, Doges or Node will instead be writing JavaScript for the
browser environment or index, not HTML.
The browser windows content not massively different, but with a few extras such as the global window
object, etc..
Now, before we switch over to working in the Renderer process, I want to again point out that we've
explicitly enabled node integration in our mind Windows Web content, meaning that regardless of being
in a browser environment, Electron allows us access to know dossier's within the renderer process.
This, of course, allowing us to use require statements or any of note duchesses APIs in indexed HTML.
Yeah, we have a JavaScript file required instead of linked in the standard way, we could have also
made this a linked script like so.
Same thing require really only being of value when writing modules with exports.
But I leave it like this.
Open that file.
And as discussed, we have a reminder here that this file will have access to no dossiers given node
integration is enabled, of course, but besides this, we are dealing with a normal linked script.
For example, I'll add a log message, renderer a log.
And now we have that log in the death tools of the browser window or in the renderer process, essentially,
then a a process is nothing more than a standard browser window with the option to enable or make available
no dodgiest APIs and being a standard browser window environment.
We, of course, also have access to any standard browser window APIs, things like drag and drop the
canvas element or a more simple example, alert.
I'll change this, log to an alert, save again.
And we see that message much like a dialogue.
So that's the basic principles of working in a renderer process.
In the next few lessons will take a look at a few of the Renderer specific modules provided by electron.